﻿@model IEnumerable<Mvc5Ef6WebApiDataFirstNthW.Models.CategoriesWebApiViewModel.Category>
@{
    ViewBag.Title = "Categories";
}
<h2>WebApi Client Categories with MVC View and data retreive in controller </h2>

<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.CategoryName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Picture)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.CategoryName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @MyRazorHelpers.TagImage("img-responsive", item.Picture, @item.CategoryName, @item.CategoryName, "0")
        </td>
    </tr>
}

</table>
